package com.tchy.cloud.entity;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Date;

import static javax.persistence.GenerationType.IDENTITY;

/**
 * Created by xiaoji on 2017/2/20.
 */
@Entity
@Table(name = "a_comment", schema = "", catalog = "")
public class ACommentEntity {
    private Long commentId;
    private ACustomerEntity consumer;
    private Integer type;
    private Long quesId;
    private Long articleId;
    private Long saysayId;
    private Long parent;
    private Integer topTotal;
    private String content;
    private Date createTime;
    private Integer replyNum;
    private Integer isRead;

    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "comment_id")
    public Long getCommentId() {
        return commentId;
    }

    public void setCommentId(Long commentId) {
        this.commentId = commentId;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "consumer_id")
    public ACustomerEntity getConsumer() {
        return consumer;
    }

    public void setConsumer(ACustomerEntity consumer) {
        this.consumer = consumer;
    }

    @Basic
    @Column(name = "type")
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    @Basic
    @Column(name = "ques_id")
    public Long getQuesId() {
        return quesId;
    }

    public void setQuesId(Long quesId) {
        this.quesId = quesId;
    }

    @Basic
    @Column(name = "article_id")
    public Long getArticleId() {
        return articleId;
    }

    public void setArticleId(Long articleId) {
        this.articleId = articleId;
    }

    @Basic
    @Column(name = "saysay_id")
    public Long getSaysayId() {
        return saysayId;
    }

    public void setSaysayId(Long saysayId) {
        this.saysayId = saysayId;
    }

    @Basic
    @Column(name = "parent")
    public Long getParent() {
        return parent;
    }

    public void setParent(Long parent) {
        this.parent = parent;
    }

    @Basic
    @Column(name = "top_total")
    public Integer getTopTotal() {
        return topTotal;
    }

    public void setTopTotal(Integer topTotal) {
        this.topTotal = topTotal;
    }

    @Basic
    @Column(name = "content")
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Basic
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "reply_num")
    public Integer getReplyNum() {
        return replyNum;
    }

    public void setReplyNum(Integer replyNum) {
        this.replyNum = replyNum;
    }

    @Basic
    @Column(name = "is_read")
    public Integer getIsRead() {
        return isRead;
    }

    public void setIsRead(Integer isRead) {
        this.isRead = isRead;
    }


}
